package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.domain.SoulTest.Option;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
/**
 * @author 钱柏羽
 * 选项相关sql
 */
public interface OptionMapper extends BaseMapper<Option> {

    @Select("SELECT top.`id`,top.`_option`\n" +
            "FROM tb_survey_question tsq \n" +
            "INNER JOIN tb_option top \n" +
            "ON tsq.`id`=top.`qid` \n" +
            "WHERE tsq.id=#{qid}")
    List<Option> selectOptionByQid(@Param("qid") String qid);
}
